package com.hx.haowumall.haowumallorder.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hx.common.to.mq.SeckillOrderTo;
import com.hx.common.utils.PageUtils;
import com.hx.haowumall.haowumallorder.entity.OrderEntity;
import com.hx.haowumall.haowumallorder.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author jzh
 * @email jzh@gmail.com
 * @date 2023-11-10 19:13:04
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 订单确认页返回需要的数据
     * */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;


    /**
     * 下单详细操作
     * */
    SubmitOrderResponseVo submitOrder(OrderSubmitVo vo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);


    /**
     * 获取当前订单的支付信息
     * */
    PayVo getOrderPayInfo(String orderSn);

    PageUtils queryPageWithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo vo);

    void createSeckill(SeckillOrderTo seckillOrder);
}

